<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:68:"F:\KM\game\bengben\public/../application/index\view\index\login.html";i:1510814344;}*/ ?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">
    <title>K米端广告系统-登录</title>
    <link rel="shortcut icon" type="image/x-icon" href="/images/favicon.ico"/>

    <link rel="stylesheet" type="text/css" href="/static/common/css/bootstrap.min.css">
    <!-- Custom CSS -->
    <link rel="stylesheet" type="text/css" href="/static/common/css/sb-admin-2.min.css">
    <!--add CSS-->
    <link rel="stylesheet" type="text/css" href="/static/index/css/style.css">
    <!-- Custom Fonts -->
    <link rel="stylesheet" type="text/css" href="/static/common/css/font-awesome.min.css">
    <!-- Bootstrap Core CSS -->
    <!-- <link href="../vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet"> -->
    <!-- MetisMenu CSS -->
    <!-- <link href="../vendor/metisMenu/metisMenu.min.css" rel="stylesheet"> -->
    <!-- Custom CSS -->
    <!-- <link href="../dist/css/sb-admin-2.css" rel="stylesheet"> -->
    <!-- Custom Fonts -->
    <!-- <link href="../vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"> -->
</head>
<body>
    <div class="lg-container">
        <div class="lg-block">
            <div class="login-panel panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title">请登录</h3>
                </div>
                <div class="panel-body">
                    <form role="form">
                        <fieldset>
                            <div class="form-group">
                                <input class="form-control" placeholder="请输入账号" name="account" type="email" autofocus>
                            </div>
                            <div class="form-group">
                                <input class="form-control" placeholder="请输入密码" name="password" type="password" value="">
                            </div>
                            <div class="checkbox">
                                <label>
                                    <input name="remember" type="checkbox" value="记住密码">记住密码
                                </label>
                            </div>
                            <!-- Change this to a button or input when using this as a form -->
                            <a href="javascript:;" class="btn btn-lg btn-success btn-block">登录</a>
                        </fieldset>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <script type="text/javascript" src="/static/common/js/jquery.min.js"></script>
    <script type="text/javascript">
        var callback = "<?php echo (isset($callback ) && ($callback  !== '')?$callback : ''); ?>";
        $(document).keydown(function(event){
            //按确定键
            if(event.keyCode==13){
                login();
            }
        });

        $('.btn-lg').on('click',login);
        function login(){
            //e.preventDefault();
            var account = $('input[name="account"]').val();
            var password = $('input[name="password"]').val();
            var url = '/index/index/ajaxsignin';
            var data = {
                account : account,
                password : password
            };
            $.post(url, data, function(json) {
                if(json.errorcode == 0) {
                    if(callback != ""){
                        window.location.href = callback;
                    } else{
                        window.location.href = '/index/advertisers/advertisersList';
                    }
                } else {
                    alert(json.message);
                }
            });
        }
    </script>
</body>
</html>
